﻿<UserControl x:Class="Spritehand.Physics3D.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:Spritehand.Physics3D"
    xmlns:Execution="clr-namespace:Balder.Execution;assembly=Balder"
    xmlns:Geometries="clr-namespace:Balder.Objects.Geometries;assembly=Balder"
    xmlns:View="clr-namespace:Balder.View;assembly=Balder"
    xmlns:Lighting="clr-namespace:Balder.Lighting;assembly=Balder"
    xmlns:Materials="clr-namespace:Balder.Materials;assembly=Balder"
    xmlns:Animation="clr-namespace:Balder.Animation.Silverlight;assembly=Balder"
    xmlns:Objects="clr-namespace:Balder.Objects;assembly=Balder"
    mc:Ignorable="d">

    <Grid x:Name="LayoutRoot" Background="Black" >
        <Canvas Background="CornflowerBlue" Width="800" Height="480"></Canvas>
        <Image x:Name="imgMapData" Source="/content/terrain.png" Stretch="None" />
        <local:MyGame x:Name="_game" Width="800" Height="480" >

            <Execution:Game.Camera>
                <View:Camera x:Name="camera1" Position="30,0,-30"/>               
            </Execution:Game.Camera>

            <Lighting:OmniLight Diffuse="White" Position="30,15,-30" />

            <Geometries:Heightmap x:Name="heightMap1" Scale="1,1,1" Position="0,0,0" Dimension="128,128" LengthSegments="128" HeightSegments="128" />

        </local:MyGame>
        <StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Margin="10,30,10,10">
            <TextBlock Margin="0,4" Foreground="White" FontSize="16" Text="Use W,A,S,D for movement."/>
            <TextBlock Margin="0,4" Foreground="White" FontSize="16" Text="Use I,J,K,L for pitch and yaw."/>
            
            <TextBlock TextWrapping="Wrap" FontSize="16"  Text="CLICK ENTER to add a:" Foreground="White" Margin="0,4"/>
            <RadioButton Foreground="White" FontSize="16" IsChecked="True" Checked="CheckBox_Checked" Tag="0" Content="Capsule" Margin="5,1,5,0" />
            <RadioButton Foreground="White" FontSize="16" Checked="CheckBox_Checked" Tag="1" Content="Sphere" Margin="5,1,5,0" />
            <RadioButton Foreground="White" FontSize="16" Checked="CheckBox_Checked" Tag="2" Content="Car" Margin="5,1,5,0" />
            <RadioButton Foreground="White" FontSize="16" Checked="CheckBox_Checked" Tag="3" Content="Ragdoll" Margin="5,1,5,0" />
            <RadioButton Foreground="White" FontSize="16" Checked="CheckBox_Checked" Tag="4" Content="Crate" Margin="5,1,5,0" />
        </StackPanel>

        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="5">
            <TextBlock Margin="0,4" Foreground="White" FontSize="16" Text="Silverlight 5 Physics using Balder and JiglibX"/>
            <HyperlinkButton NavigateUri="http://www.andybeaulieu.com" TargetName="_blank">http://www.andybeaulieu.com</HyperlinkButton>
        </StackPanel>
    </Grid>
</UserControl>
